package com.gidgabs.modules.api.controller;

import com.gidgabs.common.annotation.AuthIgnoreApi;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

@RestController
@RequestMapping("/api/routin")
public class ApiRoutingController {

    /**
     * @return
     */
    @AuthIgnoreApi
    @GetMapping("/routing")
    public ModelAndView routing(@RequestParam String url) {
        System.out.println(url);

        return new ModelAndView("redirect:" + url);
    }
}
